
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>[77代购] - 全球最大的华人代购网站</title>
<meta name="keywords" content="代购,代购网,淘宝代购,美国代购,taobao singapore, shopping singapore ," />
<meta name="description" content="77代购，一站式淘宝代购、美国亚亚马逊代购，新加坡本地商品，特价票" />


<link type="text/css" rel="stylesheet" href="<?php echo $this->url->getBaseUri() ?>public/front/templates/default/css/NewTopFoot.css"  />
<link type="text/css" rel="stylesheet" href="<?php echo $this->url->getBaseUri() ?>public/front/templates/default/css/ShoppingCart.css"/>
<link href="<?php echo $this->url->getBaseUri() ?>public/front/templates/default/css/buy1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-56181022-1', 'auto');
  ga('send', 'pageview');

</script>
<script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/front/templates/default/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/front/js/colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" media="all" type="text/css" href="<?php echo $this->url->getBaseUri() ?>public/front/js/colorbox/colorbox.css" />


<?php $this->partial('common/banner');?>


<link href="<?php echo $this->url->getBaseUri() ?>public/front/templates/default/newedit/css/index.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="<?php echo $this->url->getBaseUri() ?>public/front/templates/default/newedit/js/jquery-1.11.1.min.js"></script>
    <script src="<?php echo $this->url->getBaseUri() ?>public/front/js/jquery.js"></script>
    <script src="<?php echo $this->url->getBaseUri() ?>public/front/js/jquery.countdown.min.js"></script>
    <style type="text/css">
        .item {
            width: 100px;
            height: 100px;
        }
        .buy {
            display: none;
        }
.blink {
color: #FFF !important;
background: #FC79CE;
!important;
}
    </style>

    <script type="text/javascript">
        $(document).ready(function(){
$(".btnclick").click(function(){
   $('.list .item').each(function(i, e){
                $(e).countdown($(e).data('time'), function(event){
                    if(event.type=='update'){
                        $(this).find('.countdown').html(event.strftime('%H:%M:%S'));
                    }else if(event.type=='finish'){ 
                        $(this).find('.countdown').html('已经到期');
                        $(this).find('.buy').show();
                    }
                })
                .on('finish', function(){
                });
            });
});
});
    </script>	

<script language="javascript" type="text/javascript">   
    $(document).ready(function(){		

        $(".d_daigou").click(function(){
            $(".jiantou").show();
$("#CrawlUrl").focus();
        });
        $(".jiantou a").click(function(){
            $(this).parents(".jiantou").hide();
            return false;
        });		

$("#shangchang").click(function(){
            alert ("敬请期待");
        });

onloadFunction();
});


</script>

<script type='text/javascript'>
(function($) {
    $.fn.goTo = function() {
        $('html, body').animate({
            scrollTop: $(this).offset().top + 'px'
        }, 'fast');
        return this; // for chaining...
    }
})(jQuery);

function checkArea(name,obj)
{
document.getElementById('hdArea').value = name;
insertParam("area", document.getElementById('hdArea').value);

    return false;
}

function clickCat(name,obj)
{
insertParam("cat", name);
}

function clickArea(name,obj)
{
insertParam("area", name);
}

function insertParam(key, value)
{
    key = encodeURI(key); value = encodeURI(value);

    var kvp = document.location.search.substr(1).split('&');

    var i=kvp.length; var x; while(i--) 
    {
        x = kvp[i].split('=');

        if (x[0]==key)
        {
            x[1] = value;
            kvp[i] = x.join('=');
            break;
        }
    }

    if(i<0) {kvp[kvp.length] = [key,value].join('=');}

    //this will reload the page, it's likely better to store this until finished
    //document.location.search = kvp.join('&'); 
document.location =  window.location.pathname + '?' + kvp.join('&') + "#areadiv"; 


}
function clickMasterCategory(name,area)
{

document.getElementById('spincat').style.display = "";
var anchorItems = $(".buy_02 #sub_cat_dl a");
anchorItems.each(function(idx, a) {
var anchorItem = $(a);
if(anchorItem[0].children[0].children[0].innerHTML == name)
{
$(".buy_02>#sub_cat_dl>a>dl.b_bo_hover").removeClass("b_bo_hover");
//document.getElementById('hdMasterCat').value = name;
anchorItem[0].children[0].setAttribute("class","b_bo_hover");
}
// and the rest of your code
});

$.get('subItem.php?hfArea=' + area + '&hfCategory=' + name, function(data) {
$("#sub_cat").html(data);
$('.list .item').each(function(i, e){
                $(e).countdown($(e).data('time'), function(event){
                    if(event.type=='update'){
                        $(this).find('.countdown').html(event.strftime('%D %H:%M:%S'));
                    }else if(event.type=='finish'){ 
                        $(this).find('.countdown').html('已经到期');
                        $(this).find('.buy').show();
                    }
                })
                .on('finish', function(){
                });
            });			
});
document.getElementById('spincat').style.display = "none";

$('#sub_cat').goTo();
}
function clickCategory(name,typeid,getcat,obj)
{

document.getElementById('spinmcat').style.display = "";
var anchorItems = $(".buy_02 a");
anchorItems.each(function(idx, a) {
var anchorItem = $(a);
if(anchorItem[0].children[0].children[0].innerHTML == getcat)
{
$(".buy_02>a>dl.b_bo_hover").removeClass("b_bo_hover");
document.getElementById('hdCat').value = getcat;
anchorItem[0].children[0].setAttribute("class","b_bo_hover");
}
// and the rest of your code
});

$.get('subItemCategory.php?typeid=' + typeid + '&hfArea=' + name, 
function(data) {
$("#sub_cat_dl").html(data);
$("#sub_cat").html("");	
});
document.getElementById('spinmcat').style.display = "none";

$('#sub_cat_dl').goTo();
    return false;
}



</script>

<script type="text/javascript">
  
function addToCart(cwname,cwprice,cwqty,cwid,msid){
var productName=cwname;
var productUrl="cangwei.php?cat=" + document.getElementById('hdCat').value + "&area=" + document.getElementById('hdArea').value;
var Picture="images/cangwei.png";
var ShopName="-";
var ShopHref="-";
var price=cwprice;
var productNum="1";
var productSendPrice="0";
var productsize=cwqty;
var isAuction="0";
var chicun="0";
var yanse="-";
var type="1";
var expressno="";
var VIPPrice1="-1",VIPPrice2="-1",VIPPrice3="-1";
var productRemark="仓位: " + cwname;
var category = document.getElementById('hdCat').value;
var area = document.getElementById('hdArea').value;
var cw_id = cwid;
var msid = msid;
$.ajax({
                    type: "POST",
                    url: "/ajax/fast_ajax.php?action=addcangwei",
                    dataType: "json",
                    //contentType: "application/json;utf-8",
        
data:"adddata="+encodeURIComponent("{\"name\":'" + productName + "',\"href\":'" + productUrl + "',\"picture\":'" + Picture + "',\"thumbnail\":'" + Picture + "',\"chicun\":'" + chicun + "',\"yanse\":'" + yanse + "',\"shopName\":'" + ShopName + "',\"shopHref\":'" + ShopHref + "',\"price\":'" + price + "',\"vipPrice1\":'" + VIPPrice1 + "',\"vipPrice2\":'" + VIPPrice2 + "',\"vipPrice3\":'" + VIPPrice3 + "',\"buyNum\":'" + productNum + "',\"freight\":'" + productSendPrice + "',\"isAuction\":'" + isAuction + "',\"remark\":'" + productRemark  + "',\"type\":'" + type  + "',\"expressno\":'" + expressno + "',\"buytype\":'" + category + "',\"buyarea\":'" + area + "',\"size\":'" + productsize + "',\"cw_id\":'" + cw_id + "',\"msid\":'" + msid + "'}"),

                   timeout: 10000,
   error: function (){ alert("已有相同的舱位货品") },
   success: function (data){
location.href="/shoppingcart.php";
   }
                });

}

function addToCartRM(cwname,cwprice,cwrmprice,cwcurrrate,cwqty,cwid){
window.location.href = "buycangwei_desc.php?cwid="+cwid+"#content"; 

}

function addToCartRM_Ori(cwname,cwprice,cwrmprice,cwcurrrate,cwqty,cwid){
var productName=cwname;

var productUrl="cangwei.php?cat=" + document.getElementById('hdCat').value + "&area=" + document.getElementById('hdArea').value;
var Picture="images/cangwei.png";
var ShopName="-";
var ShopHref="-";
var price=cwprice;
var productNum="1";
var productSendPrice="0";
var productsize=cwqty;
var isAuction="0";
var chicun="0";
var yanse="-";
var type="1";
var expressno="";
var VIPPrice1="-1",VIPPrice2="-1",VIPPrice3="-1";
var productRemark="仓位: " + cwname;
var category = document.getElementById('hdCat').value;
var area = document.getElementById('hdArea').value;
var cw_id = cwid;

var cw_rm_price=cwrmprice;
var cw_curr_rate=cwcurrrate;

$.ajax({
                    type: "POST",
                    url: "/ajax/fast_ajax.php?action=addcangwei",
                    dataType: "json",
                    //contentType: "application/json;utf-8",
        
data:"adddata="+encodeURIComponent("{\"name\":'" + productName + "',\"href\":'" + productUrl + "',\"picture\":'" + Picture + "',\"thumbnail\":'" + Picture + "',\"chicun\":'" + chicun + "',\"yanse\":'" + yanse + "',\"shopName\":'" + ShopName + "',\"shopHref\":'" + ShopHref + "',\"price\":'" + price + "',\"vipPrice1\":'" + VIPPrice1 + "',\"vipPrice2\":'" + VIPPrice2 + "',\"vipPrice3\":'" + VIPPrice3 + "',\"buyNum\":'" + productNum + "',\"freight\":'" + productSendPrice + "',\"isAuction\":'" + isAuction + "',\"remark\":'" + productRemark  + "',\"type\":'" + type  + "',\"expressno\":'" + expressno + "',\"buytype\":'" + category + "',\"buyarea\":'" + area + "',\"size\":'" + productsize + "',\"cw_id\":'" + cw_id + "',\"cw_rm_price\":'" + cw_rm_price + "',\"cw_curr_rate\":'" + cw_curr_rate + "'}"),

                   timeout: 10000,
   error: function (){ alert("已有相同的舱位货品") },
   success: function (data){
location.href="/shoppingcart.php";
   }
                });

}

$(document).ready(function () {

//call the blink function on the element you want to blink
blink(".myDiv", -1, 300); //blink a div with the ID of myDiv
});

/**
 * Purpose: blink a page element
 * Preconditions: the element you want to apply the blink to, the number of times to blink the element (or -1 for infinite times), the speed of the blink
 **/
function blink(elem, times, speed) {
if (times > 0 || times < 0) {
if ($(elem).hasClass("blink")) 
$(elem).removeClass("blink");
else
$(elem).addClass("blink");
}

clearTimeout(function () {
blink(elem, times, speed);
});

if (times > 0 || times < 0) {
setTimeout(function () {
blink(elem, times, speed);
}, speed);
times -= .5;
}
}
    </script>


<form method="POST" >
<body>
<div class="box">
<div class="box_998_cent m_t_20">
<div class="buy_cont">
    	<div class="b_c_tit">

<li>地区:</li>
        	<ul id="divAreaClass">
      <?php foreach($areas as $area){ ?>
      <li>
    <a id="areali1" href="#" onclick='return checkArea("<?php echo $area->area_name;?>",this)'><?php echo $area->area_name;?></a></li>
      <?php } ?>

<input type="hidden" value="" name="hdArea" id="hdArea">
<input type="hidden" value="" name="hdpage" id="hdpage">
            </ul>
        </div>


<div class="buy_03_tit"><i>1</i>选择运送方式</div>
       <div class="buy_02" id= "areadiv">
<?php foreach ($trans as $value) { ?>
  <a><dl id="<?php echo $value->id;?>" onclick="clickCategory('','1','空运',this)"><dt><?php echo $value->trans_name;?></dt><dd><?php echo $value->desc;?></dd></dl></a>
<?php }?>
        	
<input type="hidden" value="" name="hdCat" id="hdCat">
            <div class="clear"></div>
        </div>
<div class="buy_03_tit buy_04"><i>2</i>选择运输种类</div>
       <div class="buy_02" >

<div class="spinner" id="spinmcat" style="display:none">
  <div class="spinner-container container1">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
<div class="circle4"></div>
  </div>
  <div class="spinner-container container2">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
<div class="circle4"></div>
  </div>
  <div class="spinner-container container3">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
<div class="circle4"></div>
  </div>
</div>

        	<div id="sub_cat_dl"  name="sub_cat_dl">     

            </div>
        	
        </div>
<div class="clear"></div>
<div class="buy_03_tit buy_04"><i>3</i>选择容量</div>
       

<div class="spinner" id="spincat" style="display:none">
  <div class="spinner-container container1">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
<div class="circle4"></div>
  </div>
  <div class="spinner-container container2">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
<div class="circle4"></div>
  </div>
  <div class="spinner-container container3">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
<div class="circle4"></div>
  </div>
</div>

<div id="sub_cat" style="margin-left:20px" name="sub_cat">

            </div>
<div class="clear"></div>
        
</div>
    </div>
</div>
<script type="text/javascript" charset="utf-8">
function onloadFunction() {
var getcat = decodeURIComponent(getUrlParameter('cat'));
var getarea = decodeURIComponent(getUrlParameter('area'));
var getpage = getUrlParameter('page');

document.getElementById('hdpage').value = getpage;

if (getarea == "")
{
//window.location.href = document.URL + '?cat=普通空运&area=西马'; 
}
else
{
var listItems = $("#divAreaClass li");
listItems.each(function(idx, li) {
var product = $(li);
if(product[0].children[0].innerHTML == getarea)
{
$("#divAreaClass>li>a.b_c_tit_hover").removeClass("b_c_tit_hover");
document.getElementById('hdArea').value = getarea;
product[0].children[0].setAttribute("class","b_c_tit_hover");
}	
// and the rest of your code
});




/**/
}

}

function getUrlParameter(sParam)
{
    var sPageURL = window.location.search.substring(1);
    var sURLVariables = sPageURL.split('&');
    for (var i = 0; i < sURLVariables.length; i++) 
    {
        var sParameterName = sURLVariables[i].split('=');
        if (sParameterName[0] == sParam) 
        {
            return sParameterName[1];
        }
    }
return "";
}  

</script>
</body>
</form>


<div class="clear"></div>


<script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/front/templates/default/js/indexSlide.js"></script>
</div>
</body>

<?php $this->partial('common/bottom');?>
</html>
